package model;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the OrderDetail database table.
 * 
 */
@Entity
@NamedQuery(name="OrderDetail.findAll", query="SELECT o FROM OrderDetail o")
public class OrderDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private OrderDetailPK id;

	@Column(name="NumberOfProduct")
	private int numberOfProduct;

	//bi-directional many-to-one association to Product
	@ManyToOne
	@JoinColumn(name="ProductID")
	private Product product;

	//bi-directional many-to-one association to OrderTB
	@ManyToOne
	@JoinColumn(name="OrderID")
	private OrderTB orderTb;

	public OrderDetail() {
	}

	public OrderDetailPK getId() {
		return this.id;
	}

	public void setId(OrderDetailPK id) {
		this.id = id;
	}

	public int getNumberOfProduct() {
		return this.numberOfProduct;
	}

	public void setNumberOfProduct(int numberOfProduct) {
		this.numberOfProduct = numberOfProduct;
	}

	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public OrderTB getOrderTb() {
		return this.orderTb;
	}

	public void setOrderTb(OrderTB orderTb) {
		this.orderTb = orderTb;
	}

}